Map Control Displays Error Message

Description

Alpha Anywhere's map controls and components use the Google Maps API. The Google Maps Javascript API requires an API Key.

Discussion

Alpha Anywhere uses the Google Maps Javascript API to provide mapping features, such as geocoding addresses, displaying routes, and generating static maps. The Google Maps Javascript API requires an API Key in order to access it. If no API Key is provided, it may manifest as an error message in the map control (shown below).

Image of the map control displaying an error in Alpha Anywhere because no API Key is specified.
Screenshot of the map control displaying an error in Alpha Anywhere because no API Key is specified.

Google made a change to Google Maps API on June 22, 2016, adding the requirement that you must have an API Key when using the Google Maps Javascript API.

An API Key can be created through the Google Developer's Console. You will need to create an API key for the Google Maps Javascript API.

There are three ways you can specify the API Key in Alpha Anywhere:

  1. When you add a Map control to a UX or Grid there is a property called Google Maps API key where you can set the key for the selected Map control

  2. You can open the Project Properties dialog when the Web Projects Control Panel has focus and specify the API key in the Project Properties dialog. If you specify the API key here, it will apply to all Map controls (in both the UX and Grid) defined in the current project. It will not be necessary to specify the API key in the properties each Map control. However, if you do specify an API key at the individual Map control level, that key will be used in preference to the key specified in Project Properties.

  3. You can create a file called GoogleMapsAPIkey.txt in the executable folder of the Alpha Anywhere Development version that contains the API key. This key will be used for all Map controls in both UX and Grid components if you don't specify the key at the individual Map control level, or in the Project Properties.

    If your Developer version of Alpha Anywhere is installed in the "Program Files (x86)" folder, you must have Administrator privileges to create the GoogleMapsAPIkey.txt file.

Support for specifying a Google Maps Javascript API Key is available in Alpha Anywhere Build 3702 or newer.